package com.vk.project.model.vo;


import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.Pattern;

/**
 * @ClassName : EmailRegisterVO
 * @Description : 用户注册表单信息
 * @Author : LYQ
 * @Date: 2024-02-22 09:43
 */
@Data
public class EmailRegisterVO {

    /**
     * 用户注册邮箱
     */
    @Email
    String email;

    /**
     * 验证码
     */
    @Length(max = 6, min = 6)
    String code;

    /**
     * 用户名，只允许中文和英文
     */
    @Length(min = 1, max = 10)
    @Pattern(regexp = "^[a-zA-Z0-9\\u4e00-\\u9fa5]+$")
    String username;

    /**
     * 密码
     */
    @Length(min = 6, max = 20)
    String password;

    /**
     * 确认密码
     */
    @Length(min = 6, max = 20)
    String passwordRepeat;

}
